<script setup lang="ts">
import { ref, computed } from 'vue';
const count = ref(0)
const doubleCount = computed(() => {
  return count.value * 2
})

type Item = {
  id: string
  name: string
  price: number
}

const list = ref<Item[]>([])
list.value = [
  {
    id: '1001',
    name: '男鞋',
    price: 20
  },
  {
    id: '1002',
    name: '女鞋',
    price: 20000
  },
  {
    id: '1003',
    name: '衬衫',
    price: 19
  }
]
const filterList = computed(() => {
  return list.value.filter(item => item.price > 500)
})
</script>

<template>
  <div>
    <ul>
      <li v-for="item in filterList" :key="item.id">
        {{ item.name }} -- {{ item.price }}
      </li>
    </ul>
  </div>
</template>

<style scoped>
</style>
